<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    
	
	<title>_打包出库</title>
	<script type="text/javascript">
	        $(function() {
		    $("#inputForm").validate(); 
       }); 
    </script>
</head>

<body>
	<div style="height: 10px;"></div>
	
	<!-- 出库单信息 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">出库单信息</th>
		</thead>
		<thead><tr>
		    <th style="width: 150px;">出库单号</th>
		    <th style="width: 100px;">出库类型</th>
		    <th style="width: 150px;">相关单号</th>
		    <th style="width: 100px;">出库网点</th>
		    <th style="width: 100px;">创建人</th>
		    <th style="width: 150px;">创建时间</th>
			<th style="width: 100px;">当前环节</th>
		</tr></thead>
		<tbody>
		<tr>
		    <td>${bill.billCode}</td>
		    <td>
		      <c:if test="${bill.billType eq '1'}"> 调拨出库 </c:if>
		    </td>
		    <td>${bill.aboutCode}</td>
		    <td>${bill.areagroup.groupName}</td>
		    <td>${bill.creater.realname}</td>
		    <td>${fn:substring(bill.createTime,0,19)}</td>
		    <td>${bill.status}</td>
		</tr>
		</tbody>
	</table>
	
	<!-- 出库清单明细 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">出库清单明细</th>
		</thead>
		<thead><tr>
		    <th style="width: 100px;">商家</th>
		    <th style="width: 100px;">sku</th>
		    <th style="width: 100px;">数量</th>
		</tr></thead>
		<tbody>
		<c:forEach items="${billItemList}" var="item">
		<tr>
		    <td>${item.customerCode}</td>
		    <td>${item.sku}</td>
		    <td>${item.num}</td>
		</tr>
		</c:forEach>
		</tbody>
	</table>
	
	<form id="inputForm" action="${ctx}/package/pkg" method="post" class="form-horizontal">
	<!-- 打包信息 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">打包信息</th>
		</thead>
		<thead><tr>
		    <th style="width: 150px;">箱子数量</th>
		    <th style="width: 100px;">SKU数量</th>
		    <th style="width: 150px;">商品总数</th>
		</tr></thead>
		<tbody>
		<tr>
		    <td>
		       <input  type="hidden" name="billId" value="${bill.id}"/>
		       <input type="text" value="${bill.boxNum}" name="boxNum" class="required digits"/>
		    </td>
		    <td><input type="text" value="${bill.skuNum}" name="skuNum" class="required digits"/></td>
		    <td><input type="text" value="${bill.goodsNum}" name="goodsNum" class="required digits"/></td>
		</tr>
		</tbody>
	</table>
	
	
	<div class="form-actions">
	     <input  type="hidden" value="${bill.billCode}" name="billCode"/>
	     <input type="submit" value="确认打包" class="btn btn-primary"/>
	     <a href="${ctx}/package" class="btn" >返回</a>
	</div>
	</form>
	
</body>
</html>
